/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.eduardcapell.lopodder.io;

import com.eduardcapell.lopodder.beans.Feed;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author edu
 */
public class RefreshFeedThread implements Runnable {

    private List<Feed> feeds = null;
    

    public RefreshFeedThread(List<Feed> feeds) {
        this.feeds = feeds;
    }
    
    public void run() {
        DownloadLock.downloading = true;
        Iterator<Feed> it = feeds.iterator();

        while (it.hasNext()) {
            Feed f = it.next();
            f.fetchItems();
            System.out.println("Processed feed '" + f.getName() + "'");
        }
        DownloadLock.downloading = false;
    }


}
